<template>
  <div>
    <!-- <h1>app--{{ msg }}</h1> -->
    <Child></Child>
    <hr />
    <Child
      :msg="msg"
      @click="getChildData"
    ></Child>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import Child from './Child.vue'
const msg = ref('父组件的数据')
const getChildData = (data) => (msg.value = data)
</script>
<style
  lang="scss"
  scoped
></style>
